const express = require('express');
const router = express.Router();

const researchTopicService = require('../service/researchTopicService')

// 表单验证
const expressJoi = require('@escook/express-joi')
const { researchTopic_insert,researchTopic_update } = require('../rule/researchTopicRule')

router.get('', researchTopicService.researchTopic);

router.get('/byId', researchTopicService.researchTopicById);

router.post('/add', expressJoi(researchTopic_insert), researchTopicService.add);

router.post('/delete',researchTopicService.delete);

router.post('/update',expressJoi(researchTopic_update) ,researchTopicService.update);


module.exports = router;
